﻿using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace Compass.PlanService.Infrastructure.Migrations
{
    /// <inheritdoc />
    public partial class updatepackinglistidtomainplanid : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.RenameColumn(
                name: "PackingListId",
                table: "Pallets",
                newName: "MainPlanId");

            migrationBuilder.RenameIndex(
                name: "IX_Pallets_PackingListId_IsDeleted",
                table: "Pallets",
                newName: "IX_Pallets_MainPlanId_IsDeleted");

            migrationBuilder.RenameColumn(
                name: "PackingListId",
                table: "PackingItems",
                newName: "MainPlanId");

            migrationBuilder.RenameIndex(
                name: "IX_PackingItems_PackingListId_IsDeleted",
                table: "PackingItems",
                newName: "IX_PackingItems_MainPlanId_IsDeleted");
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.RenameColumn(
                name: "MainPlanId",
                table: "Pallets",
                newName: "PackingListId");

            migrationBuilder.RenameIndex(
                name: "IX_Pallets_MainPlanId_IsDeleted",
                table: "Pallets",
                newName: "IX_Pallets_PackingListId_IsDeleted");

            migrationBuilder.RenameColumn(
                name: "MainPlanId",
                table: "PackingItems",
                newName: "PackingListId");

            migrationBuilder.RenameIndex(
                name: "IX_PackingItems_MainPlanId_IsDeleted",
                table: "PackingItems",
                newName: "IX_PackingItems_PackingListId_IsDeleted");
        }
    }
}
